home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig10_02.jar
/
Ch10
/
Fig10_02
/
Shape.h
< prev
Wrap
C/C++ Source or Header
|
1997-10-28
|
407b
|
19 lines
// Fig. 10.2: shape.h
// Definition of abstract base class Shape
#ifndef SHAPE_H
#define SHAPE_H
#include <iostream.h>
class Shape {
public:
virtual double area() const { return 0.0; }
virtual double volume() const { return 0.0; }
// pure virtual functions overridden in derived classes
virtual void printShapeName() const = 0;
virtual void print() const = 0;
};
#endif